import 'dart:convert';

import 'package:enterprise_v6_app/app/data/entities/application/role_personnel_entity.dart';
import 'package:enterprise_v6_app/app/data/entities/common/form_value_entity.dart';
import 'package:enterprise_v6_app/generated/json/base/json_field.dart';
import 'package:enterprise_v6_app/generated/json/process_currency_emergency_entity.g.dart';
export 'package:enterprise_v6_app/generated/json/process_currency_emergency_entity.g.dart';

@JsonSerializable()
class ProcessCurrencyEmergencyEntity {
  ProcessCurrencyEmergencyEntity();

  factory ProcessCurrencyEmergencyEntity.fromJson(Map<String, dynamic> json) => $ProcessCurrencyEmergencyEntityFromJson(json);

  /// 审批意见
  late String approvalOpinions = '';

  ///	审批人签字
  late String approvalUser = '';

  ///	候检审核部门id
  late String auditDepartment = '';

  ///	表单结果
  late List<FormValueEntity> formValue = [];

  ///	预案ID
  late String id = '';

  ///	是否是最终节点 true是 false否
  late bool last = false;

  ///	下一个节点的执行人 有则修改，空则不管
  late List<RolePersonnelEntity> nextNodeExecutor = [];

  ///	执行节点id
  late String nodeId = '';

  ///	执行节点id
  late String rtNodeId = '';

  ///流程唯一编码
  late String processEncoding = '';

  ///	是否驳回
  late bool reject = false;

  ///
  late String rtemplateId = '';

  ///	状态：1-通过 2-不通过
  late int status = 0;

  /// 区域id
  late List<String> regions = [];

  /// 设备id
  late List<String> equipmentIds = [];

  /// 企业平面图id
  late List<String> views = [];

  Map<String, dynamic> toJson() => $ProcessCurrencyEmergencyEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
